package com.android.scanProject;

import com.google.zxing.BinaryBitmap;
import com.google.zxing.Result;
import com.google.zxing.qrcode.QRCodeReader;

import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;

public class ScanProject extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        findViewById(R.id.Start_Btn).setOnClickListener(mClickListener);
        findViewById(R.id.Rank_Btn).setOnClickListener(mClickListener);
        findViewById(R.id.End_Btn).setOnClickListener(mClickListener);
        
    }
    Button.OnClickListener mClickListener = new Button.OnClickListener(){

  public void onClick(View v) {
//   Intent intent;
   // TODO Auto-generated method stub
   switch(v.getId())
   {
   case R.id.Start_Btn:
	   Intent intent = new Intent(ScanProject.this, ScanResult.class);                 
//          intent.putExtra("etNameValue", etName.getText().toString()); 
       startActivity(intent);  
	   
//	   Intent intent = new Intent("com.google.zxing.client.android.SCAN");

	   //startActivityForResult(intent, 0);



	
    break;
   case R.id.Rank_Btn:
    intent = new Intent(ScanProject.this, ScanList.class);                 
          //intent.putExtra("etNameValue", etName.getText().toString()); 
          startActivity(intent);
    break;
   case R.id.End_Btn:
    finish();
    //System.exit(0);
    break;
   }
  }
    };





}
